/* GUI CONVERTED from ppptrp03.p (converter v1.76) Tue Mar 26 14:44:31 2002 */
/* ppptrp03.p - INVENTORY VALUATION REPORT                                    */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.6.1.8 $                                                       */
/*V8:ConvertMode=FullGUIReport                                                */
/* REVISION: 6.0    LAST MODIFIED: 04/19/90   BY: PML                         */
/* REVISION: 7.0    LAST MODIFIED: 09/04/91   BY: pma *F003*                  */
/* REVISION: 7.0    LAST MODIFIED: 03/11/92   BY: WUG *F280*                  */
/* REVISION: 7.0    LAST MODIFIED: 07/13/92   BY: pma *F760*                  */
/* REVISION: 7.3    LAST MODIFIED: 10/26/94   BY: jxz *FS89*                  */
/* REVISION: 7.3    LAST MODIFIED: 07/07/95   BY: ais *G0RR*                  */
/* REVISION: 7.3    LAST MODIFIED: 10/13/95   BY: str *G0ZG*                  */
/* REVISION: 7.3    LAST MODIFIED: 09/11/96   BY: *G2DS* Murli Shastri        */
/* REVISION: 8.6    LAST MODIFIED: 10/10/97   BY: mzv *K0QW*                  */
/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane          */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan         */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00   BY: *N08T* Annasaheb Rahane   */
/* REVISION: 9.1      LAST MODIFIED: 05/15/00   BY: *N08Y* Mark Christian     */
/* REVISION: 9.1      LAST MODIFIED: 05/03/00   BY: *N09M* Peter Faherty      */
/* REVISION: 9.1      LAST MODIFIED: 08/13/00   BY: *N0KQ* Mark Brown         */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* Revision: 1.6.1.5   BY: Jean Miller         DATE: 12/14/01  ECO: *P03Q*  */
/* $Revision: 1.6.1.8 $   BY: Patrick Rowan   DATE: 04/24/01  ECO: *P00G*  */

/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

/* DISPLAY TITLE */

/*GUI global preprocessor directive settings */
&GLOBAL-DEFINE PP_PGM_RP TRUE
&GLOBAL-DEFINE PP_ENV_GUI TRUE


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

{mfdtitle.i "b+ "}

define variable abc         like pt_abc.
define variable abc1        like pt_abc.
define variable part        like pt_part.
define variable part1       like pt_part.
define variable vend        like pt_vend.
define variable vend1       like pt_vend.
define variable line        like pt_prod_line.
define variable line1       like pt_prod_line.
define variable site        like in_site.
define variable site1       like in_site.
define variable part_group  like pt_group.
define variable part_group1 like pt_group.
define variable part_type   like pt_part_type.
define variable part_type1  like pt_part_type.
define variable part-cnt    as integer.
define variable l_msgdesc   like msg_desc extent 2 no-undo.

define variable ext_std as decimal label "Ext GL Cost"
   format "->>>>,>>>,>>9.99" no-undo.
define variable ext_cur as decimal label "Ext Current Cost"
   format "->>>>,>>>,>>9.99" no-undo.
define variable cost_var as decimal label "Var %" format "->>9.9%" no-undo.
define variable acc as decimal extent 3 format "->>>>,>>>,>>9.99" no-undo.

define variable neg_qty      like mfc_logical initial yes
   label "Include Negative Inventory".
define variable total_qty_oh like in_qty_oh.
define variable pl-printed   like mfc_logical no-undo.
define variable first-prod   like mfc_logical no-undo.
define variable net_qty      like mfc_logical initial yes
   label "Include Non-nettable Inventory".
define variable inc_zero_qty like mfc_logical initial no
   label "Include Zero Quantity".
define variable non_consign_qoh like in_qty_oh no-undo.

/* CONSIGNMENT VARIABLES */
{pocnvars.i}
{pocnvar2.i}

/* SELECT FORM */

/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
   
 RECT-FRAME       AT ROW 1.4 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1   COLUMN 3 NO-LABEL
 SKIP(.1)  /*GUI*/
line           colon 15
   line1          label "To" colon 49 skip
   part           colon 15
   part1          label "To" colon 49 skip
   vend           colon 15
   vend1          label "To" colon 49 skip
   abc            colon 15
   abc1           label "To" colon 49 skip
   site           colon 15
   site1          label "To" colon 49 skip
   part_group     colon 15
   part_group1    label "To" colon 49 skip
   part_type      colon 15
   part_type1     label "To" colon 49 skip(1)
   neg_qty        colon 35 skip
   net_qty        colon 35 skip
   inc_zero_qty   colon 35
   customer_consign    colon 35
   supplier_consign    colon 35
 SKIP(.4)  /*GUI*/
with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER.
 F-a-title = &IF (DEFINED(SELECTION_CRITERIA) = 0)
  &THEN " Selection Criteria "
  &ELSE {&SELECTION_CRITERIA}
  &ENDIF .
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:WIDTH-PIXELS in frame a =
  FONT-TABLE:GET-TEXT-WIDTH-PIXELS(
  RECT-FRAME-LABEL:SCREEN-VALUE in frame a + " ", RECT-FRAME-LABEL:FONT).
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5. /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



/* SET EXTERNAL LABELS */
setFrameLabels(frame a:handle).

/* * QTY. ON HAND IS THE SUM OF NETTABLE AND NON-NETTABLE LOCATIONS */
{pxmsg.i &MSGNUM=3779 &ERRORLEVEL=1 &MSGBUFFER=l_msgdesc[1]}

/* QUANTITY ON HAND IS THE SUM OF NETTABLE LOCATIONS ONLY */
{pxmsg.i &MSGNUM=3780 &ERRORLEVEL=1 &MSGBUFFER=l_msgdesc[2]}

find first icc_ctrl no-lock.

/* REPORT BLOCK */
{wbrp01.i}

/* DETERMINE IF CUSTOMER CONSIGNMENT IS ACTIVE */
{gprun.i ""gpmfc01.p""
   "(input ENABLE_CUSTOMER_CONSIGNMENT,
     input 10,
     input ADG,
     input CUST_CONSIGN_CTRL_TABLE,
     output using_cust_consignment)"}

/* DETERMINE IF SUPPLIER CONSIGNMENT IS ACTIVE */
{gprun.i ""gpmfc01.p""
   "(input ENABLE_SUPPLIER_CONSIGNMENT,
     input 11,
     input ADG,
     input SUPPLIER_CONSIGN_CTRL_TABLE,
     output using_supplier_consignment)"}

if using_cust_consignment then do:
   {gplngn2a.i
      &file = ""cncix_ref""
      &field = ""report""
      &code = customer_consign_code
      &mnemonic = "customer_consign"
      &label    = customer_consign_label}
end.  /* if using_cust_consignment */

if using_supplier_consignment then do:
   {gplngn2a.i
      &file = ""cnsix_ref""
      &field = ""report""
      &code = supplier_consign_code
      &mnemonic = "supplier_consign"
      &label    = supplier_consign_label}
end.  /* if using_supplier_consignment */


/*GUI*/ {mfguirpa.i true "printer" 132 " " " " " "  }

/*GUI repeat : */
/*GUI*/ procedure p-enable-ui:


   if part1 = hi_char then part1 = "".
   if line1 = hi_char then line1 = "".
   if vend1 = hi_char then vend1 = "".
   if abc1 = hi_char then abc1 = "".
   if site1 = hi_char then site1 = "".
   if part_group1 = hi_char then part_group1 = "".
   if part_type1 = hi_char then part_type1 = "".

   if c-application-mode <> 'web' then
   
run p-action-fields (input "display").
run p-action-fields (input "enable").
end procedure. /* p-enable-ui, replacement of Data-Entry GUI*/

/*GUI*/ procedure p-report-quote:


   if using_cust_consignment then do:
      {gplngv.i
         &file = ""cncix_ref""
         &field = ""report""
         &mnemonic = "customer_consign"
         &isvalid  = mnemonic_valid}

      if not mnemonic_valid then do:
         {pxmsg.i &MSGNUM=712 &ERRORLEVEL=3} /*INVALID OPTION*/
         /*GUI NEXT-PROMPT removed */
         /*GUI UNDO removed */ RETURN ERROR.
      end.

      {gplnga2n.i
         &file = ""cncix_ref""
         &field = ""report""
         &code = customer_consign_code
         &mnemonic = "customer_consign"
         &label    = customer_consign_label}
   end.  /* if using_cust_consignment */

   if using_supplier_consignment then do:
      {gplngv.i
         &file = ""cnsix_ref""
         &field = ""report""
         &mnemonic = "supplier_consign"
         &isvalid  = mnemonic_valid}

      if not mnemonic_valid then do:
         {pxmsg.i &MSGNUM=712 &ERRORLEVEL=3} /*INVALID OPTION*/
         /*GUI NEXT-PROMPT removed */
         /*GUI UNDO removed */ RETURN ERROR.
      end.

      {gplnga2n.i
         &file = ""cnsix_ref""
         &field = ""report""
         &code = supplier_consign_code
         &mnemonic = "supplier_consign"
         &label    = supplier_consign_label}
   end.  /* if using_supplier_consignment */

   /* ADDED customer_consign  */

   {wbrp06.i &command = update &fields = "  line line1 part part1 vend
        vend1 abc abc1 site site1 part_group part_group1 part_type part_type1
        neg_qty net_qty inc_zero_qty
        customer_consign supplier_consign"
      &frm = "a"}

   if not using_cust_consignment then
      customer_consign = " ". /* EXCLUDE */
   if not using_supplier_consignment then
      supplier_consign = " ". /* EXCLUDE */

   if (c-application-mode <> 'web') or
      (c-application-mode = 'web' and
      (c-web-request begins 'data'))
   then do:

      bcdparm = "".

      {mfquoter.i line   }
      {mfquoter.i line1  }
      {mfquoter.i part   }
      {mfquoter.i part1  }
      {mfquoter.i vend   }
      {mfquoter.i vend1  }
      {mfquoter.i abc    }
      {mfquoter.i abc1   }
      {mfquoter.i site   }
      {mfquoter.i site1  }
      {mfquoter.i part_group  }
      {mfquoter.i part_group1 }
      {mfquoter.i part_type}
      {mfquoter.i part_type1}
      {mfquoter.i neg_qty}
      {mfquoter.i net_qty}
      {mfquoter.i inc_zero_qty}
      {mfquoter.i customer_consign}
      {mfquoter.i supplier_consign}

      if part1 = "" then part1 = hi_char.
      if line1 = "" then line1 = hi_char.
      if vend1 = "" then vend1 = hi_char.
      if abc1 = "" then abc1 = hi_char.
      if site1 = "" then site1 = hi_char.
      if part_group1 = "" then part_group1 = hi_char.
      if part_type1 = "" then part_type1 = hi_char.
   end.

   /* OUTPUT DESTINATION SELECTION */
   
/*GUI*/ end procedure. /* p-report-quote */
/*GUI - Field Trigger Section */

/*GUI MFSELxxx removed*/
/*GUI*/ procedure p-report:
/*GUI*/   {gpprtrpa.i "printer" 132 " " " " " " " " }
/*GUI*/   mainloop: do on error undo, return error on endkey undo, return error:
find first icc_ctrl no-lock.



   {mfphead.i}

   FORM /*GUI*/  header
      l_msgdesc[1]
   with STREAM-IO /*GUI*/  frame pagefoot page-bottom width 132.
   view frame pagefoot.

   FORM /*GUI*/  header
      l_msgdesc[2]
   with STREAM-IO /*GUI*/  frame pagefoot1 page-bottom width 132.

   if net_qty = no then hide frame pagefoot.
   if net_qty = no then view frame pagefoot1.

   /* FIND AND DISPLAY */
   for each pt_mstr where (pt_part >= part and pt_part <= part1)
      and (pt_prod_line >= line and pt_prod_line <= line1)
      and (pt_group >= part_group and pt_group <= part_group1)
      and (pt_part_type >= part_type and pt_part_type <= part_type1)
   no-lock,
      each in_mstr where in_part = pt_part
      and can-find(first ld_det where ld_site = in_site
                                  and ld_part = in_part)
         and (in_abc >= abc and in_abc <= abc1)
         and (in_site >= site and in_site <= site1) no-lock
   break by pt_prod_line by pt_part by in_site with frame b width 132
   down no-box:

      /* SET EXTERNAL LABELS */
      setFrameLabels(frame b:handle).

      if first-of(pt_prod_line) then
         pl-printed = no.

      if first-of(pt_part) then
         part-cnt = 0.

      find ptp_det where ptp_part = pt_part
                   and   ptp_site = in_site
      no-lock no-error.

      if (available ptp_det and
         (ptp_vend >= vend and ptp_vend <= vend1))
         or (not available ptp_det and
         (pt_vend >= vend and pt_vend <= vend1))
      then do:

         {gpsct03.i &cost=sct_cst_tot}

         assign
            non_consign_qoh = 0
            tot_cust_consign_qty = 0
            tot_supp_consign_qty = 0
            total_qty_oh = 0.

         for each ld_det where ld_part = pt_part
                           and ld_site = in_site
         no-lock:

            find is_mstr where is_status = ld_status
            no-lock no-error.

            if net_qty = yes or not available is_mstr
               or (available is_mstr and is_net)
            then
         do:
               assign
                  non_consign_qoh = non_consign_qoh + ld_qty_oh - ld_cust_consign_qty - ld_supp_consign_qty
                  total_qty_oh = total_qty_oh + ld_qty_oh.

               /*DETERMINE CONSIGNMENT QUANTITIES */

               if using_cust_consignment then do:

                  cust_consign_qty = ld_cust_consign_qty.

                  /* IF "EXCLUDE" THEN SUBTRACT CONSIGNMENT INVENTORY QTY */
                  if customer_consign_code = EXCLUDE then
                     total_qty_oh = total_qty_oh - cust_consign_qty.

                  /* IF "ONLY" THEN SUBTRACT THE LOCATION QTY ON-HAND  */
                  /* AND ADD CONSIGNMENT INVENTORY QTY.                */

                  if customer_consign_code = ONLY then
                     total_qty_oh = total_qty_oh  - ld_qty_oh + cust_consign_qty.

                  tot_cust_consign_qty = tot_cust_consign_qty + cust_consign_qty.

               end. /*If using_cust_consignment*/

               if using_supplier_consignment then do:

                  /*READ THE LOCATION DETAIL CONSIGNMENT ON-HAND QTY*/

                  supp_consign_qty = ld_supp_consign_qty.

                  /* IF "EXCLUDE" THEN SUBTRACT CONSIGNMENT INVENTORY QTY */
                  if supplier_consign_code = EXCLUDE then
                     total_qty_oh = total_qty_oh - supp_consign_qty.

                  /* IF "ONLY" THEN SUBTRACT THE LOCATION QTY ON-HAND  */
                  /* AND ADD CONSIGNMENT INVENTORY QTY.                */
                  if supplier_consign_code = ONLY then
                     total_qty_oh = total_qty_oh - ld_qty_oh + supp_consign_qty.

                  tot_supp_consign_qty = tot_supp_consign_qty + supp_consign_qty.

               end. /*If using_supplier_consignment*/

            end.  /* if net_qty = yes or not available is_mstr */

         end.

         if (inc_zero_qty or total_qty_oh <> 0)
            and (neg_qty or total_qty_oh >= 0)
         then do:

            part-cnt = part-cnt + 1.

            if pl-printed = no then do:

               if page-size - line-counter < 6 then page.

               find pl_mstr where pl_prod_line = pt_prod_line
               no-lock no-error.

               if available pl_mstr
               then
                  put
                     skip(1)
                     getTermLabel("PRODUCT_LINE",17) + ": " format "x(19)"
                     pl_prod_line space(3)
                     pl_desc
                     skip(1).

               pl-printed = yes.
               first-prod = yes.

            end.

            FORM /*GUI*/  header
               skip (1)
               getTermLabel("PRODUCT_LINE",17) + ":" format "x(19)"
               pl_prod_line   space (3)
               pl_desc        skip
            with STREAM-IO /*GUI*/  frame phead1 page-top no-labels width 132 no-box.

            find pl_mstr where pl_prod_line = pt_prod_line
            no-lock no-error.

            if available pl_mstr and not first-prod
            then
               view frame phead1.

            first-prod = no.

            ext_std = round(total_qty_oh * glxcst,2).
            ext_cur = round(total_qty_oh * curcst,2).
            cost_var = 0.

            if ext_std <> ext_cur then
               cost_var = 100 * (ext_cur - ext_std) / ext_std.

            accumulate ext_std (total by pt_part by pt_prod_line).
            accumulate ext_cur (total by pt_part by pt_prod_line).

            accumulate total_qty_oh (total by pt_part by pt_prod_line).

            if page-size - line-counter < 2
               and (pt_desc1 > "" or pt_desc2 > "")
            then page.

            else
            if page-size - line-counter < 3
               and (pt_desc1 > "" and pt_desc2 > "")
            then page.

            display
               pt_part format "x(26)"
               in_abc
               in_site
               total_qty_oh
               pt_um
               glxcst
               ext_std
               curcst
               ext_cur
               if (cost_var >= -999.9 and cost_var <= 9999.9) or cost_var = ?
               then
                  cost_var
               else
                  0 @ cost_var
            with frame b STREAM-IO /*GUI*/ .

            if cost_var > 9999.9 then
               display ">9999.9%" @ cost_var with frame b STREAM-IO /*GUI*/ .
            else
            if cost_var < -999.9 then
               display "<-999.9%" @ cost_var with frame b STREAM-IO /*GUI*/ .

            if pt_desc1 > "" then do with frame b:
               down 1.
               display "  "  + pt_desc1 @ pt_part WITH STREAM-IO /*GUI*/ .
            end.

            if pt_desc2 > "" then do with frame b:
               down 1.
               display "  "  + pt_desc2 @ pt_part WITH STREAM-IO /*GUI*/ .
            end.

            if tot_cust_consign_qty <> 0 or tot_supp_consign_qty <> 0 then
            do with frame b:
               underline total_qty_oh.
               down 1.
               display
                  getTermLabelRtColon("NON-CONSIGNED",24) @ pt_part
                  non_consign_qoh @ total_qty_oh WITH STREAM-IO /*GUI*/ .

               if tot_cust_consign_qty <> 0 then do:
                  down 1.
                  display
                     getTermLabelRtColon("CUSTOMER_CONSIGNED",24) @ pt_part
                     tot_cust_consign_qty @ total_qty_oh WITH STREAM-IO /*GUI*/ .
               end.  /* if tot_cust_consign_qty <> 0 */

               if tot_supp_consign_qty <> 0 then do:
                  down 1.
                  display
                     getTermLabelRtColon("SUPPLIER_CONSIGNED",24) @ pt_part
                     tot_supp_consign_qty @ total_qty_oh WITH STREAM-IO /*GUI*/ .
               end.  /* if tot_supp_consign_qty <> 0 */

               down 1.

            end.  /* do with frame b */

         end. /* if (inc_zero_qty ... */

      end. /* if available ptp_det */

/*       if last-of(pt_part) and part-cnt = 1 then */
/*          down 1 with frame b.                   */

      if last-of(pt_part) and part-cnt >= 1
      then do with frame b:

         acc[1] = accum total by pt_part  ext_std.
         acc[2] = accum total by pt_part  ext_cur.
         acc[3] = accum total by pt_part  total_qty_oh.
         cost_var = 0.

         if acc[1] <> acc[2]
         then
            cost_var = 100 * (acc[2] - acc[1]) / acc[1].
/*
         if pt_desc1 = "" and pt_desc2 = "" then down 1.
*/
/*          if page-size - line-counter < 1 then do with frame b:  */
/*             page.                                               */
/*             down 1.                                             */
/*           end.                                                  */
/*           else                                                                                              */
/*               underline  pt_part in_abc in_site total_qty_oh pt_um glxcst ext_std curcst ext_cur cost_var.  */

/*
         display
            getTermLabel("ITEM_TOTAL",15) + ":" format "x(16)" @ glxcst
            acc[1] @ ext_std
            acc[2] @ ext_cur
            if (cost_var >= -999.9 and cost_var <= 9999.9) or cost_var = ?
            then
               cost_var
            else
               0 @ cost_var WITH STREAM-IO /*GUI*/ .

         if cost_var > 9999.9 then
            display ">9999.9%" @ cost_var WITH STREAM-IO /*GUI*/ .
         else
         if cost_var < -999.9 then
            display "<-999.9%" @ cost_var WITH STREAM-IO /*GUI*/ .

         down 1.
*/
      end.

      if last-of(pt_prod_line)
         and pl-printed
      then do with frame b:

         acc[1] = accum total by pt_prod_line ext_std.
         acc[2] = accum total by pt_prod_line ext_cur.
         acc[3] = accum total by pt_prod_line total_qty_oh.
         cost_var = 0.

         if acc[1] <> acc[2]
            then cost_var = 100 * (acc[2] - acc[1]) / acc[1].
/*
         if pt_desc1 = "" and pt_desc2 = "" then down 1.
*/
         if page-size - line-counter < 1 then do with frame b:
            page.
            down 1.
         end.

         down 1.
         underline total_qty_oh ext_std ext_cur cost_var.

         display
            getTermLabel("PRODUCT_LINE_TOTAL",15) + ":" format "x(16)" @ pt_part
            acc[1] @ ext_std
            acc[2] @ ext_cur
            acc[3] @ total_qty_oh
            if (cost_var >= -999.9 and cost_var <= 9999.9) or cost_var = ?
            then
               cost_var
            else
               0 @ cost_var WITH STREAM-IO /*GUI*/ .

         if cost_var > 9999.9 then
            display ">9999.9%" @ cost_var WITH STREAM-IO /*GUI*/ .
         else
         if cost_var < -999.9 then
            display "<-999.9%" @ cost_var WITH STREAM-IO /*GUI*/ .

      end.

      if last (pt_prod_line) then do with frame b:

         acc[1] = accum total ext_std.
         acc[2] = accum total ext_cur.
         acc[3] = accum total total_qty_oh.
         cost_var = 0.
         if acc[1] <> acc[2]
            then cost_var = 100 * (acc[2] - acc[1]) / acc[1].

         down 1.
         if page-size - line-counter < 2 then page.

         underline total_qty_oh ext_std ext_cur cost_var.

         display
            getTermLabel("REPORT_TOTAL",15) + ":" format "x(16)" @ pt_part
            acc[1] @ ext_std
            acc[2] @ ext_cur
            acc[3] @ total_qty_oh
            if (cost_var >= -999.9 and cost_var <= 9999.9) or cost_var = ?
            then cost_var else 0 @ cost_var WITH STREAM-IO /*GUI*/ .

         if cost_var > 9999.9 then
            display ">9999.9%" @ cost_var WITH STREAM-IO /*GUI*/ .
         else
         if cost_var < -999.9 then
            display "<-999.9%" @ cost_var WITH STREAM-IO /*GUI*/ .

      end.

      
/*GUI*/ {mfguichk.i } /*Replace mfrpchk*/


   end.

   /* REPORT TRAILER */
   
/*GUI*/ {mfguitrl.i} /*Replace mfrtrail*/

/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/


end.

{wbrp04.i &frame-spec = a}

/*GUI*/ end procedure. /*p-report*/
/*GUI*/ {mfguirpb.i &flds=" line line1 part part1 vend vend1 abc abc1 site site1 part_group part_group1 part_type part_type1 neg_qty net_qty inc_zero_qty customer_consign supplier_consign "} /*Drive the Report*/
